package com.example.demo.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author SongJun
 * @description TODO:
 * @date 2021/8/5 11:33
 */
@Component
public class TestAutoWire2 {
    TestAutowire1 test1;
    private String name = "I am test2";

    public TestAutowire1 getTestAutowire1() {
        return test1;
    }

    public void setTestAutowire1(TestAutowire1 testAutowire1) {
        this.test1 = testAutowire1;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("TestAutoWire2{");
        sb.append("name='").append(name).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
